package net.uman.service;

import java.util.List;

import net.uman.dao.TopicDao;
import net.uman.entity.Topic;
import net.uman.framework.modules.orm.Page;
import net.uman.framework.modules.orm.PropertyFilter;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class TopicManager extends Manager {
	@Autowired
	private TopicDao topicDao;

	public Page<Topic> findTopicPage(Page<Topic> page,List<PropertyFilter> filters) {
		return topicDao.findPage(page, filters);
	}
	
	public void deleteTopic(Long topicId){
		topicDao.delete(topicId);
	}
	
	public Topic getTopic(Long id){
		return topicDao.get(id);
	}
	
	public void save(Topic topic){
		topicDao.save(topic);
	}
}
